package ui.custom.label;

import java.awt.Dimension;

import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.border.Border;

import domain.valueObejcts.Employee;

public class PersonLabel extends JLabel {

	private static final long serialVersionUID = 1L;
	
	private Employee person;

	public PersonLabel(Employee person) {
		super(person.getSurName() + ", " + person.getForName());
		Border raisedbevel = BorderFactory.createRaisedBevelBorder();
		Border loweredbevel = BorderFactory.createLoweredBevelBorder();
		Border compound = BorderFactory.createCompoundBorder(raisedbevel, loweredbevel);
		this.setBorder(compound);
		this.setPreferredSize(new Dimension(200, 30));
		this.person = person;
	}

	public Employee getPerson(){
		return this.person;
	}
}
